package com.tps.utils;

import java.sql.Connection;  
import java.sql.DriverManager;
import java.sql.SQLException;
  
public class dbconn {  
    public static Connection getConnection() throws ClassNotFoundException,  
            SQLException {
        String driver = "org.postgresql.Driver";        
        String url = "jdbc:postgresql://localhost:5432/TpsData";  
        String username = "tpsadmin";  
        String password = "kingdee";  
        Class.forName(driver);  
        Connection conn = DriverManager.getConnection(url, username, password);  
        return conn;  
    }  
}  
